/**
 * @Time    : 2021/11/12 11:50:15
 * @Author  : WanRongJia
 * @License : Software business license
 * @Site    : www.linshensjl.top
 * @File    : validateAddClerk.js
 * @Software: Rich Web Platform
 * @Function: 验证登录用户字段
 * @Version : 1.0
 **/

const {validateResult} = require('../../../utils/validationResult')
const {check} = require('express-validator')

const validateSendMailToUser = [
    check('email').exists().withMessage('必须传入邮箱'),
    check('subject').exists().withMessage('必须传入邮箱主题'),
    check('text').optional().isString().withMessage('必须传入邮件正文'),
    check('html').optional().isString().withMessage('必须是字符'),
    (req, res, next) => {
        validateResult(req,res,next)
    },
]

module.exports = {validateSendMailToUser}